crypto: surface OpenSSL errors in Certificate.exportPublicKey#63272
Open
fru1tworld wants to merge 3 commits into
Open
crypto: surface OpenSSL errors in Certificate.exportPublicKey#63272fru1tworld wants to merge 3 commits into
fru1tworld wants to merge 3 commits into
Conversation
Refs: nodejs#63264 Signed-off-by: fru1tworld <fruitworld.planet@gmail.com>
Collaborator
|
Review requested:
|
Codecov Report❌ Patch coverage is
Additional details and impacted files@@ Coverage Diff @@
## main #63272 +/- ##
==========================================
- Coverage 91.94% 90.02% -1.92%
==========================================
Files 362 714 +352
Lines 155999 225245 +69246
Branches 24057 42581 +18524
==========================================
+ Hits 143429 202781 +59352
- Misses 12295 14243 +1948
- Partials 275 8221 +7946
🚀 New features to boost your workflow:
|
Renegade334
reviewed
May 13, 2026
Comment on lines
+44
to
+50
| MarkPopErrorOnReturn mark_pop_error_on_return; | ||
| BIOPointer bio = ncrypto::ExportPublicKey(input.data(), input.size()); | ||
| if (!bio) return args.GetReturnValue().SetEmptyString(); | ||
| if (!bio) { | ||
| return ThrowCryptoError(env, | ||
| mark_pop_error_on_return.peekError(), | ||
| "Failed to export public key from SPKAC"); | ||
| } |
Member
There was a problem hiding this comment.
This is only wrapping a single operation, should it not just be using ERR_get_error() instead?
Co-authored-by: René <contact.9a5d6388@renegade334.me.uk>
Author
|
Thanks For feedback! |
e9b1f4b to
e753ba5
Compare
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Surface internal OpenSSL failures via
ThrowCryptoErrorinstead of returning an empty string, matching the convention used elsewhere insrc/crypto.Refs: #63264